<template>
  <view class="home-main">
    <view class="swiper-warp">
      <swiper class="home-swiper" indicator-dots="true" indicator-color="#fff">
				<swiper-item v-for="item in swipers" :key ="item.id">
					<image :src="item.img"></image>
				</swiper-item>
      </swiper>
    </view>
		
		<!-- <image src="http://www.itcast.cn/subject/webzly/images/1.jpg"></image> -->
  </view>
</template>

<script>
import { getSwiper } from '../../network/home.js'

export default {
  data() {
    return {
      title: 'Hello',
			swipers:[]
    }
  },
  onLoad() {
    this._getSwiper()
  },
  methods: {
    async _getSwiper() {
      const res = await getSwiper()
			this.swipers = res.message
      console.log(res)
    },
  },
}
</script>

<style lang="scss" >
	.swiper-warp{
		width: 750rpx;
		height: 300rpx;
		.home-swiper{
			width: 100%;
			image{
				width: 100%;
				height: 100%;
			}
			
		}
		
		
	}
	
</style>
